package com.nsp.test;

import java.io.UnsupportedEncodingException;
import java.util.*;

public class Hello {
	ArrayList<Integer> m_arraylist = new ArrayList<Integer>();
	public java.util.LinkedList<String> list = new java.util.LinkedList<String>();

	public Hello() {
		list = new java.util.LinkedList<String>();
		m_arraylist.add(99);
		
	}

	public static void main(String args[]) {		
		String s = "a_v_c_v2.0B O&%$#~!@ppppp";
		try {
			s = java.net.URLEncoder.encode(s,"GB2312");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(s);
		

		LinkedList<Integer> l = new LinkedList<Integer>();
		l.add(1000);
		java.util.Iterator<Integer> it = l.iterator();
		while (it.hasNext()) {
			System.out.println(it.next());
		}

		l.add(10);
		java.util.Vector<java.lang.Byte> v = new java.util.Vector<Byte>();
		byte a = -1;
		v.add(a);
		java.util.Map<java.lang.Character, java.lang.Integer> map;
		map = new java.util.HashMap<Character, Integer>();
		map.put('a', 10);
		map.put('b', 100);
		java.util.Iterator<java.lang.Integer> itmap = map.values().iterator();
		// map['a'] = 12;
		while (itmap.hasNext()) {
			System.out.println(itmap.next());
		}

		char key = 'b';
		if (map.containsKey(key)) {
			map.put(key, 99);
		}

		java.util.Iterator<java.lang.Character> cmap = map.keySet().iterator();
		while (cmap.hasNext()) {
			System.out.println(cmap.next());
		}

		if (map.containsKey('b')) {
			System.out.print("find a");
			System.out.println(",value:" + map.get('b'));
		}

		map.entrySet().iterator();

		for (int i = 0; i < map.size(); ++i) {
			map.keySet().iterator();
		}

		// java.lang.Byte

		/*
		 * try { for (int i = 0; i < 5; ++i) { hello.list.add("ssssss"); }
		 * java.util.Iterator<String> it = hello.list.iterator();
		 * System.out.println(hello.list.size()); while (it.hasNext()) {
		 * base64.out((String) it.next()); } } catch (NullPointerException e) {
		 * System.out.println(e.getMessage()); }
		 * System.out.println("sssfwfdsdfasdas");
		 */
	}
}
